1. Field of the Invention
The present invention relates to an arithmetic unit with a reduced startup time. More particularly, the present invention relates to a data loading process in an arithmetic unit comprising a Central Processing Unit (CPU).
2. Description of the Background Art
Conventionally, in an arithmetic unit comprising a CPU, a cache. RAM, and ROM, the CPU accesses desired data by reading it from the cache if the desired data is in the cache, or by reading it from the RAM if the desired data is not in the cache but in the RAM. If the desired data is not in either the cache or RAM, the CPU copies the desired data from the ROM to RAM, and then reads the data from the RAM (see, for example, page 2, FIG. 1 of Japanese Laid-Open Patent Publication No. 05-242057).
FIG. 3 is a flowchart showing a startup process for an operating system (OS).
When the system startup process is initiated by turning on the power (S101), the CPU designates, in order to read desired data, an address associated with the data (S102), and then determines sequentially whether the data is in the cache or RAM by checking these two elements in this order (S103 and S105). If the desired data is in the cache, the CPU reads it from the cache (S104). If the desired data is not in the cache but in the RAM, the CPU reads it from the RAM (S108).
If the desired data is not in either the cache or RAM, the CPU starts copying necessary data (which at least includes desired data) from the ROM to RAM (S106), and waits for the copy to complete (S107). Upon completion of the copy, the CPU reads the desired data from the RAM (S108). The CPU then processes the read data (S109).
There is no data left in a volatile memory, such as a cache or RAM, at the time of the startup process, and therefore a conventional system requires that RAM be initialized (as used herein, “initialization” means writing data necessary for the startup process to the RAM) by copying data from the ROM to the RAM every time the system is started. After the initialization of the RAM, the CPU performs the startup process by reading data necessary for the startup process, from the RAM. In other words, in a conventional system, the CPU is unable to proceed with the startup process until the copying of data from the ROM to the RAM is complete, and consequently, the startup process requires a considerable amount of time.
It might be possible to temporarily save, at the time of suspend, data in the RAM in a non-volatile memory and write back the data to the RAM when resuming from a suspended state. However, in this case too, the same problem as that associated with the startup process occurs. That is, until the data saved in the non-volatile memory has been written back to the RAM, the CPU is unable to perform any process using such data.